#include<iostream>
#include<vector>
#include<cstring>
using namespace std;
typedef pair<int, int> PII;
#define x first
#define y second
const int N = 5;
char g[N][N];
char backup[N][N];
void turn_one(int x, int y)
{
	if (g[x][y] == '-') {
		g[x][y] = '+';
	}
	else {
		g[x][y] = '-';
	}
}
int get(int x, int y)
{
	return x * 4 + y;
}
void turn_all(int x, int y)
{
	for (int i = 0; i < 4; i++) {
		turn_one(x, i);
		turn_one(i, y);
	}
	turn_one(x, y);
}
int main()
{
	for (int i = 0; i < 4; i++) {
		cin >> g[i];
	}
	vector<PII>ans;
	for (int op = 0; op < 1 << 16; op++) {
		memcpy(backup, g, sizeof(g));
		vector<PII>temp;
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 4; j++) {
				if (op >> get(i, j) & 1) {
					temp.push_back({ i,j });
					turn_all(i, j);
				}
			}
		}
		bool has_closed = 0;
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 4; j++) {
				if (g[i][j] == '+') {
					has_closed = 1;
				}
			}
		}
		if (!has_closed) {
			if (ans.empty() || ans.size() > temp.size()) {
				ans = temp;
			}
		}
		memcpy(g, backup, sizeof(g));
	}
	cout << ans.size() << endl;
	for (auto t : ans) {
		cout << t.x + 1 << " " << t.y + 1 << "\n";
	}
	return 0;
}